﻿<%@ Page Language="C#" MasterPageFile="~/FrontEnd.Master" AutoEventWireup="true" CodeBehind="Results.aspx.cs" Inherits="MonkeyShop.Web.Results" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <a href="DesktopBuilder.aspx">DesktopBuilder</a>
    <asp:Literal ID="Literal1" runat="server"></asp:Literal>
    <%if (ProductDetailsModels != null)
      {
          var alt = true; %>
    <table class="tab_box" align="center" cellspacing="0" cellpadding="0" style="border-top: 1px solid #BAB8B8; width: 100%;">
        <% foreach (var p in ProductDetailsModels)
           { %>
        <tr>
            <td class="tdw">
                <img alt="CPU" src="<%=p.Image %>" /></td>
            <td class="<%=alt?"tdlb":"tdl" %>">
                <p class="heading_pink"><b><%=p.CategoryName %></b></p>
                <b><%=p.Name %></b>
            </td>
            <td class="tdr"><p class="heading_pink"><b><%=p.PriceString %></b></p></td>
        </tr>
        <% alt = !alt;
           } %>
    </table>
    <%} %>
    <%--<script type="text/javascript">
        var pids = [<%=string.Join(",", CatalogCommon.SavedDesktopModel.ProductIds) %>];
        function DesktopBuilderResultModel() {
            var self = this;
            self.products = ko.observableArray();
            
            $.blockUI();
            
            $.ajax({
                url: "Services/ProductService.aspx/Ps",
                type: "post",
                contentType: "application/json",
                async: true,
                success: function (data) {
                    self.products(data.d);
                }
            });
        }
        
        var desktopBuilderResultModel = new DesktopBuilderResultModel();
        $(function () {
            $(document).ajaxStop($.unblockUI);
            ko.applyBindings(desktopBuilderResultModel);
        });
    </script>--%>
</asp:Content>
